package com.xz.cstone.data;

import java.util.ArrayList;

public class CElementEdge implements Comparable {
	
	public double distance = 0.0;
	public int e1 = -1;
	public int e2 = -1;
	
	public CElementEdge(int e1, int e2, double distance) {
		this.distance = distance;
		this.e1 = e1;
		this.e2 = e2;
	}

	@Override
	public int compareTo(Object arg0) {
		CElementEdge other = (CElementEdge)arg0;
		if (distance < other.distance) {
			return -1;
		} else if (distance > other.distance) {
			return 1;
		} else {
			return 0;
		}
	}
}
